/*
 * $Id: JdtFormatter.java 30 2006-06-08 13:26:40Z wjx $
 */
package com.someok.utils.datetime;

/**
 * Interface for date/time string formatters. Formatter sets and gets date time
 * values to/from strings.
 *
 * <p><a href="JdtFormatter.java.html"><i>View Source</i></a></p>
 *
 * @version $Revision: 30 $ $Date: 2006-06-08 21:26:40 +0800 (星期四, 08 六月 2006) $
 */
public interface JdtFormatter {

	/**
	 * Sets time from string and specified template. It returns a new instance of
	 * <code>DateTimeStamp</code> or <code>null</code> if error occurs.
	 *
	 * @param value    string containing date time values
	 * @param template template
	 *
	 * @return DateTimeStamp instance with populated data
	 */
	public DateTimeStamp set(String value, String template);

	/**
	 * Gets time from string and specified template.
	 *
	 * @param jdt      JDateTime to read from
	 * @param template template
	 *
	 * @return string with date time information
	 */
	public String get(JDateTime jdt, String template);

}
